<?php 
ini_set('display_errors', 1); 
ini_set('error_reporting', 'E_error'); 
 require_once "../includes/config.php";
 ?>
 <script type="text/javascript">
 function update_handling_time(handling_time_id)
 {
	window.location="index.php?edit_handling_time&handling_time_id="+handling_time_id;
 }
 </script>
<form action="" method="post" name="formService" id="formService"> 
<table width="100%"  border="1" cellspacing="0" class="container">
  <tr>
    <td width="469" height="25" class="tdHeader">Handling Time <span style="text-align:right; padding-left:300px;"><input type='button' name='addsscat' value='Add Handling Time' class='button' onclick="update_handling_time(0);" /></span></td>
  </tr>  
  <tr>
    <td height="577">	
	<table width="100%"  border="0" cellspacing="0">
	 <tr>
	   <td height="27"  class="line">&nbsp;</td>
	   <td class="line">&nbsp;</td>	   
	   <td colspan="3"  class="line" style="text-align:right;">
	   		
		</td>
	 </tr>
	 <tr class="InnerHeader">
	   <td width="1%"  class="line">&nbsp;</td>
	   <td width="40%" class="line">Name</td>
	   <td width="41%" class="line">Description</td>
	   <td width="9%" class="line"></td>
	   <td width="9%" class="line"></td>
	 </tr>	 
	 <?php
		 	  $sqlShwSubcat="select * from tbl_handling_time ";
			  $rstShwSubcat=mysql_query($sqlShwSubcat);
			  $numShwSubcat=mysql_num_rows($rstShwSubcat);
			  if($numShwSubcat==0) 
			  {
				 echo "<tr><td></td><td colspan='4'><h3>No Handling Time Found...</h3></td></tr>";
			  }
			  else 
			  {
			  while($rowShwSubCat=mysql_fetch_array($rstShwSubcat)) 
			  {
				 $subcatId=$rowShwSubCat['handling_time_id'];
				 $subcatName=$rowShwSubCat['handling_time_name'];
				 $subcatDesc=$rowShwSubCat['handling_time_description'];				
				 echo "<tr>";
				 echo "<td class='line'>&nbsp;</td>";
				 echo "<td class='line'>$subcatName</td>";
				 echo "<td class='line'>$subcatDesc</td>";
				 echo "<td class='line'><input type='button' name='edit' value='Edit' class='button' onclick='update_handling_time($subcatId);'></td>";
				 echo "<td height='20' class='line'></td> ";
				 echo "</tr>";
			  }
			  }
		 ?>
	 <tr>
		   <td>&nbsp;</td>
		   <td>&nbsp;</td>
		   <td>&nbsp;</td>
		   <td></td>
		   <td></td>
	  </tr>
	</table>
</td>
</tr>
</table>
</form>